#include <bits/stdc++.h>

#include <atcoder/all>
#define LL long long
using namespace std;
using namespace atcoder;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int N, H;

    cin >> N >> H;
    vector<int> t(N), l(N), u(N);

    for (int i = 0; i < N; i++) {
      cin >> t[i] >> l[i] >> u[i];
    }

    bool succ = true;
    int ll = H, uu = H, tt = 0;

    for (int i = 0; i < N; i++) {
      int dt = t[i] - tt;

      ll = max(ll - dt, 1);
      uu = uu + dt;

      if (uu < l[i] || u[i] < ll) {
        succ = false;
        break;
      }

      tt += dt;
      ll = max(ll, l[i]);
      uu = min(uu, u[i]);
    }
    if (succ) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  }
  return 0;
}
